var onScanSuccess = null;
var onError = null;

var scannerCodeBarre = {	
	lancerAction: function(onScanSuccessCallBack, onErrorCallBack)	 {
		onError = onErrorCallBack;
		onScanSuccess = onScanSuccessCallBack;
		window.plugins.barcodeScanner.scan(this.onCodeReceive, this.onError);
	},
	
	onCodeReceive: function(result) {
		onScanSuccessCallBack(result);
	},
	onError: function(error) {
		onErrorCallBack(error);
	}
};